{#
  Copyright 2015 Google Inc. All Rights Reserved.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
#}

<div class="dialog" id="create-project">
  <div class="dialog__box">

    <section class="dialog__box-content">

      <form action="/project/create" method="post">
        <h1 class="dialog__title">Create a Project</h1>

        <p class="dialog__description">This will contain a collection of Actions (things on which you wish to track performance).</p>

        <section class="dialog__section">
          <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
            <input autocomplete="off" class="mdl-textfield__input" type="text" name="project-name" value="{{ project_name }}" pattern=".{2,}" />
            <label class="mdl-textfield__label" for="project-name">Project Name</label>
            <span class="mdl-textfield__error">Project name must not be empty.</span>
          </div>

        </section>

        <section class="dialog__section">
          <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="project-visible-to-owner-only">
            <input id="project-visible-to-owner-only" type="checkbox" class="mdl-checkbox__input" checked name="project-visible-to-owner-only" />
            <span class="mdl-checkbox__label">Private</span>
          </label>

        </section>

        <div class="dialog__button-container">
          <button type="button" class="cancel-button mdl-button mdl-js-button mdl-js-ripple-effect">
            Cancel
          </button>

          <button type="button" class="confirm-button mdl-button mdl-js-button mdl-js-ripple-effect">
            Create Project
          </button>
        </div>

        <input type="hidden" name="project-key" value="" />

      </form>
    </section>

    <section class="dialog__spinner-container">
      <div class="dialog__spinner mdl-spinner mdl-js-spinner is-active"></div>
    </section>
  </div>
</div>

<div class="dialog" id="edit-project">
  <div class="dialog__box">

    <section class="dialog__box-content">

      <form action="/project/edit" method="post">
        <h1 class="dialog__title">Edit a Project</h1>

        <p class="dialog__description">This will contain a collection of Actions (things on which you wish to track performance).</p>

        <section class="dialog__section">
          <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
            <input autocomplete="off" class="mdl-textfield__input" type="text" name="project-name" value="" pattern=".{2,}" />
            <label class="mdl-textfield__label" for="project-name">Project Name</label>
            <span class="mdl-textfield__error">Project name must not be empty.</span>
          </div>

        </section>

        <section class="dialog__section">
          <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="project_visible_to_owner_only_edit">
            <input id="project_visible_to_owner_only_edit" type="checkbox" class="mdl-checkbox__input" name="project-visible-to-owner-only" />
            <span class="mdl-checkbox__label">Private</span>
          </label>

        </section>

        <div class="dialog__button-container">
          <button type="button" class="cancel-button mdl-button mdl-js-button mdl-js-ripple-effect">
            Cancel
          </button>

          <button type="button" class="confirm-button mdl-button mdl-js-button mdl-js-ripple-effect">
            Edit Project
          </button>
        </div>

        <input type="hidden" name="project-visible-only-to-owner" value="" />
        <input type="hidden" name="project-key" value="" />

      </form>
    </section>

    <section class="dialog__spinner-container">
      <div class="dialog__spinner mdl-spinner mdl-js-spinner is-active"></div>
    </section>
  </div>
</div>

<div class="dialog" id="delete-project">
  <div class="dialog__box">

    <section class="dialog__box-content">

      <form action="/project/delete" method="post">
        <h1 class="dialog__title">Delete this Project?</h1>

        <p class="dialog__description">This will remove the project and all Action information it contains. Are you sure?</p>

        <div class="dialog__button-container">
          <button type="button" class="cancel-button mdl-button mdl-js-button mdl-js-ripple-effect">
            Cancel
          </button>

          <button type="button" class="confirm-button mdl-button mdl-js-button mdl-js-ripple-effect">
            Delete Project
          </button>
        </div>

        <input type="hidden" id="project-key" name="project-key" value="" />

      </form>
    </section>

    <section class="dialog__spinner-container">
      <div class="dialog__spinner mdl-spinner mdl-js-spinner is-active"></div>
    </section>
  </div>
</div>

<button id="create-project-button" class="add-trace mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
  <i class="material-icons">add</i>
</button>
